package com.sumainfor.pc.market.controller.rentadviser;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.common.utlis.PageUtils;
import com.sumainfor.common.utlis.Pager;
import com.sumainfor.pc.market.service.RdHousingConService;
import com.sumainfor.pc.market.service.RdHousingService;
import com.sumainfor.pc.market.service.RdTenantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * 市场部房源配置
 */
@RestController
@RequestMapping("/rentadviser/RdHousingCon")
public class RdHousingConController implements Serializable {
    @Autowired
    private RdHousingConService rdHousingConService;


    /**
     * 运营部服务管家变更房源配置根据房源主表编号查询各个房间的房源的配置
     * @param params
     * @return
     */
    @GetMapping("/getHouConAllList")
    public JsonResult getHouConAllList(@RequestParam Map<String, Object> params) {
        JsonResult result=new JsonResult();
        List<Map<String,Object>> list=rdHousingConService.getHouConAllList(params);
        if (list!=null){
            result.put(list);
        }else{
            result.putFailed("服务器繁忙");
        }
        return result;
    }

    /**
     * 工程部验房新增房源配置
     * @param params
     * @return
     */
    @PostMapping("/key/addHouCon")
    public JsonResult addHouCon(@RequestBody Map<String, Object> params) {
        return rdHousingConService.addHouCon(params);
    }
    /**
     * 获取房间钥匙
     * @param params
     * @return
     */
    @PostMapping("/getRdIntePassWord")
    public JsonResult getRdIntePassWord(@RequestBody Map<String, Object> params) {
        return rdHousingConService.getRdIntePassWord(params);
    }
    /**
     * 运营部助理发送钥匙
     */
    @PostMapping("/key/getRdInteHouConInfoList")
    public JsonResult getRdInteHouConInfoList(@RequestBody Map<String,Object> params){
        return rdHousingConService.getRdInteHouConInfoList(params);
    }
}
